package com.microservice.base.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;

/**
 * 通用树用户关系表
 *
 * @author zq
 * @email 513973172@qq.com
 * @date 2020-01-14 11:10:02
 */
@Data
public class TreeviewUser implements Serializable {
    private static final long serialVersionUID = 751527475178412757L;

    //主键
    @Length(min = 0, max = 36)
    @ApiModelProperty(value = "主键", notes = "主键", allowEmptyValue = false, required = false)
    private String id;
    //学校编码
    @Length(min = 0, max = 20)
    @ApiModelProperty(value = "学校编码", notes = "学校编码", allowEmptyValue = false, required = false)
    private String schoolCode;
    //用户id
    @Length(min = 0, max = 36)
    @ApiModelProperty(value = "用户id", notes = "用户id", allowEmptyValue = false, required = false)
    private String userId;
    //用户类型（0：管理员1：操作员2：老师3：学生）
    @Length(min = 0, max = 20)
    @ApiModelProperty(value = "用户类型（0：管理员1：操作员2：老师3：学生）", notes = "用户类型（0：管理员1：操作员2：老师3：学生）", allowEmptyValue = false, required = false)
    private String userType;
    //通用树id
    @Length(min = 0, max = 36)
    @ApiModelProperty(value = "通用树id", notes = "通用树id", allowEmptyValue = false, required = false)
    private String treeviewId;
    //通用树类型（g-c:行政班 g-t：教学班 s-d:行政部门）
    @Length(min = 0, max = 20)
    @ApiModelProperty(value = "通用树类型（g-c:行政班 g-t：教学班 s-d:行政部门）", notes = "通用树类型（g-c:行政班 g-t：教学班 s-d:行政部门）", allowEmptyValue = false, required = false)
    private String tvType;
    //权限（逗号分隔）1、请假审批，2、归宿考勤申诉，3、校门出入申诉，4、课程考勤申诉；
    @Length(min = 0, max = 500)
    @ApiModelProperty(value = "权限（逗号分隔）", notes = "权限（逗号分隔）", allowEmptyValue = false, required = false)
    private String authority;
    //职务id
    @Length(min = 0, max = 36)
    @ApiModelProperty(value = "职务id", notes = "职务id", allowEmptyValue = false, required = false)
    private String positionId;
    //任职到期时期
    @ApiModelProperty(value = "任职到期时期", notes = "任职到期时期", allowEmptyValue = false, required = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date positionTime;

    //是否是重要职务（0：重要 1：不重要）
    @Length(min = 0, max = 1)
    @ApiModelProperty(value = "是否是重要职务（0：重要 1：不重要）", notes = "是否是重要职务（0：重要 1：不重要）", allowEmptyValue = false, required = false)
    private String importancePosition;
    //状态
    @Length(min = 0, max = 10)
    @ApiModelProperty(value = "状态", notes = "状态", allowEmptyValue = false, required = false)
    private String status;
    //1：已删除，0：正常
    @Length(min = 0, max = 1)
    @ApiModelProperty(value = "1：已删除，0：正常", notes = "1：已删除，0：正常", allowEmptyValue = false, required = false)
    private String deleted;
    //更新时间
    @ApiModelProperty(value = "更新时间", notes = "更新时间", allowEmptyValue = false, required = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    //同步标志,0、未变化，1、变化，9、已经同步
    @Length(min = 0, max = 10)
    @ApiModelProperty(value = "0:未变化，1:变化，9:已经同步", notes = "0:未变化，1:变化，9:已经同步", allowEmptyValue = false, required = false)
    private String syncFlag;

}
